<?php $this->load->view('admin/public/head.html', array('css' => array(
    '/assets/admin/css/admin/common.css'
))); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper systemAdmin" ng-controller="admin-admin-role-index">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            管理员设置
            <small>设置用户角色</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i>后台首页</a></li>
            <li class="active">管理员设置</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <div class="box">
                    <div class="box-header with-border">
                        <h3 class="box-title">角色列表</h3>
                        <div class="box-tools">
                            <div class="input-group input-group-sm">
                                <a type="submit" class="btn btn-info btn-sm" href="/admin/role/add" style="background: #00a65a; border: none;"><i class="fa fa-plus"></i> 添加角色</a>
                            </div>
                        </div>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table class="table table-bordered">
                            <tr>
                                <th style="width: 30px">#</th>
                                <th class="text-center">角色名称</th>
                                <th class="text-center">创建时间</th>
                                <th class="text-center" style="width: 120px">操作</th>
                            </tr>
                            <tr ng-repeat="($index, list) in roles">
                                <td ng-bind="list.id"></td>
                                <td class="text-center" ng-bind="list.role"></td>
                                <td class="text-center" ng-bind="list.created_time"></td>
                                <td>
                                    <a ng-show="list.id != 1" class="btn btn-link btn-flat btn-xs" href="/admin/role/add?roleId={{list.id}}"><i class="fa fa-pencil"></i> 编辑</a>
                                    <a ng-show="list.id != 1" class="btn btn-link btn-xs btn-flat" ng-click="remove(list.id)"><i class="fa fa-trash-o"></i> 删除</a>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>

    </section>
    <!-- /.content -->
</div>

<!-- /.content-wrapper -->
<?php $this->load->view('admin/public/foot.html', array('js' => array(
    '/assets/admin/js/admin/role.js'
))); ?>
